import request from "@/utils/request";

// 下拉
export const getList = () => {
  return request("/manager/business-hall/tree");
};

// 表格列表
export const getUserList = (params) => {
  return request({ url: "/manager/business-hall/courier/page", params });
};

// 查找
export const diTu = (id) => {
  return request({
    url: `/manager/business-hall/scope/${id}/2`,
    params: { id },
  });
};

// 司机管理表格列表
export const getDriver = (params) => {
  return request({
    url: "/manager/driver/page",
    params,
  });
};

// 获取司机详情
export const getDriverUser = (id) => {
  return request({
    url: `/manager/driver/${id}`,
    params: { 0: id },
  });
};

// 获取驾驶证信息
export const getDriveProve = (id) => {
  return request({
    url: `/manager/driverLicense/${id}`,
    params: { 0: id },
  });
};

// 保存司机驾驶证信息
export const postDrive = (data) => {
  return request({
    url: "/manager/driverLicense",
    method: "post",
    data,
  });
};

// 二层弹层选择器
export const getDialog = () => {
  return request({
    url: "/manager/unWorkingTrucks",
  });
};

// 车辆详情
export const getCarInfo = (id) => {
  return request({
    url: `/manager/truck/${id}`,
  });
};
